import {useDispatch, useSelector} from "react-redux";
import {useEffect} from "react";
import {getChannelList} from "@/store/modules/article";

export function useChannel(){
    const channelList=useSelector(item=>item.article.channelList)
    const dispatch=useDispatch()
    useEffect(()=>{
        dispatch(getChannelList())
    },[])
    return{
        channelList
    }
}

